﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MySql.Data.MySqlClient;
using Cinemon.MySqlConnect;

public partial class Rooms_add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == true)
        {
            if (Int32.Parse(islebox.Text) > 0)
            {

                using (DatabaseManager manager = new DatabaseManager())
                {
                    List<MySqlParameter> param = new List<MySqlParameter> {
				new MySqlParameter("isleN", islebox.Text),
				new MySqlParameter("rowN", rowbox.Text)
			        };
                    manager.ExecuteNonQuery("InsertRoom", param);
                }
                Response.Redirect("view.aspx");
            }
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("view");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
          
    }
}